{"ast":null,"code":"import _defineProperty from \"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport * as React from 'react';\nimport { SpaceContext } from '.';\nexport default function Item(_ref) {\n  var className = _ref.className,\n    direction = _ref.direction,\n    index = _ref.index,\n    marginDirection = _ref.marginDirection,\n    children = _ref.children,\n    split = _ref.split,\n    wrap = _ref.wrap;\n  var _React$useContext = React.useContext(SpaceContext),\n    horizontalSize = _React$useContext.horizontalSize,\n    verticalSize = _React$useContext.verticalSize,\n    latestIndex = _React$useContext.latestIndex,\n    supportFlexGap = _React$useContext.supportFlexGap;\n  var style = {};\n  if (!supportFlexGap) {\n    if (direction === 'vertical') {\n      if (index < latestIndex) {\n        style = {\n          marginBottom: horizontalSize / (split ? 2 : 1)\n        };\n      }\n    } else {\n      style = Object.assign(Object.assign({}, index < latestIndex && _defineProperty({}, marginDirection, horizontalSize / (split ? 2 : 1))), wrap && {\n        paddingBottom: verticalSize\n      });\n    }\n  }\n  if (children === null || children === undefined) {\n    return null;\n  }\n  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n    className: className,\n    style: style\n  }, children), index < latestIndex && split && /*#__PURE__*/React.createElement(\"span\", {\n    className: \"\".concat(className, \"-split\"),\n    style: style\n  }, split));\n}","map":{"version":3,"names":["React","SpaceContext","Item","_ref","className","direction","index","marginDirection","children","split","wrap","useContext","horizontalSize","verticalSize","latestIndex","supportFlexGap","style","marginBottom","Object","assign","paddingBottom","undefined","createElement","Fragment"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/antd/es/space/Item.js"],"sourcesContent":["import * as React from 'react';\nimport { SpaceContext } from '.';\nexport default function Item(_ref) {\n  let {\n    className,\n    direction,\n    index,\n    marginDirection,\n    children,\n    split,\n    wrap\n  } = _ref;\n  const {\n    horizontalSize,\n    verticalSize,\n    latestIndex,\n    supportFlexGap\n  } = React.useContext(SpaceContext);\n  let style = {};\n  if (!supportFlexGap) {\n    if (direction === 'vertical') {\n      if (index < latestIndex) {\n        style = {\n          marginBottom: horizontalSize / (split ? 2 : 1)\n        };\n      }\n    } else {\n      style = Object.assign(Object.assign({}, index < latestIndex && {\n        [marginDirection]: horizontalSize / (split ? 2 : 1)\n      }), wrap && {\n        paddingBottom: verticalSize\n      });\n    }\n  }\n  if (children === null || children === undefined) {\n    return null;\n  }\n  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n    className: className,\n    style: style\n  }, children), index < latestIndex && split && /*#__PURE__*/React.createElement(\"span\", {\n    className: `${className}-split`,\n    style: style\n  }, split));\n}"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,YAAY,QAAQ,GAAG;AAChC,eAAe,SAASC,IAAI,CAACC,IAAI,EAAE;EACjC,IACEC,SAAS,GAOPD,IAAI,CAPNC,SAAS;IACTC,SAAS,GAMPF,IAAI,CANNE,SAAS;IACTC,KAAK,GAKHH,IAAI,CALNG,KAAK;IACLC,eAAe,GAIbJ,IAAI,CAJNI,eAAe;IACfC,QAAQ,GAGNL,IAAI,CAHNK,QAAQ;IACRC,KAAK,GAEHN,IAAI,CAFNM,KAAK;IACLC,IAAI,GACFP,IAAI,CADNO,IAAI;EAEN,wBAKIV,KAAK,CAACW,UAAU,CAACV,YAAY,CAAC;IAJhCW,cAAc,qBAAdA,cAAc;IACdC,YAAY,qBAAZA,YAAY;IACZC,WAAW,qBAAXA,WAAW;IACXC,cAAc,qBAAdA,cAAc;EAEhB,IAAIC,KAAK,GAAG,CAAC,CAAC;EACd,IAAI,CAACD,cAAc,EAAE;IACnB,IAAIV,SAAS,KAAK,UAAU,EAAE;MAC5B,IAAIC,KAAK,GAAGQ,WAAW,EAAE;QACvBE,KAAK,GAAG;UACNC,YAAY,EAAEL,cAAc,IAAIH,KAAK,GAAG,CAAC,GAAG,CAAC;QAC/C,CAAC;MACH;IACF,CAAC,MAAM;MACLO,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